package com.tianbao54.thrift.spring.service;

import com.tianbao54.thrift.spring.generated.User;
import com.tianbao54.thrift.spring.generated.UserService;
import org.apache.thrift.TException;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService.Iface {

    @Override
    public void sendMessage(User user) throws TException {
        System.out.println("server : " + user);
    }

    @Override
    public User receiveMessage() throws TException {
        return new User().setId(1).setName("zhangsan").setAddress("beijing").setMessage("message").setTitle("title");
    }
}
